package org.example.service.impl;

import org.example.dao.UserDao;
import org.example.entity.User;
import org.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public int getTotalCount() {
        return userDao.countUsers();
    }
    @Override
    public List<User> getUserList(int start, int length) {
        return userDao.selectUsers(start, length);
    }
}
